From: Roan Kattouw Date: Wed, 24 Jul 2013 06:26:37 +0000 (-0700) Subject: Pass through request parameters in API action=edit X-Git-Tag: 1.31.0-rc.0~19134 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=e617dc6c8f2ce1d867ddadcd4bc3de098a84ff07;p=lhc%2Fweb%2Fwiklou.git Pass through request parameters in API action=edit In addition to constructing a fake request using the data the caller gave us, also pass through any other request variables that might have been set. This is a bit of an evil hack, but it's the only thing we can do to make random things like wpReviewEdit in FlaggedRevs work through the API. Change-Id: Idab5b524b0e3daae58ab4f26466c0f6d9d8d3044 --- diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index 3d0b42503f..5b29ea6ef0 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -293,6 +293,10 @@ class ApiEditPage extends ApiBase { $requestArray['wpWatchthis'] = ''; } + // Pass through anything else we might have been given, to support extensions + // This is kind of a hack but it's the best we can do to make extensions work + $requestArray += $this->getRequest()->getValues(); + global $wgTitle, $wgRequest; $req = new DerivativeRequest( $this->getRequest(), $requestArray, true );